package com.bawei.erp.controller;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.bawei.erp.model.SOrder;
import com.bawei.erp.service.SOrderService;
import com.bawei.util.JsonUtil;

@RestController()
@RequestMapping("/sorder")
public class SOrderController {

	@Resource
	private SOrderService sOrderService;

	@RequestMapping("/addSOrder")
	public String addSOrder(SOrder order) {
		sOrderService.addSOrder(order);
		return JsonUtil.success();
	}

	@RequestMapping("/getSOrder")
	public String getSOrder() {
		return JsonUtil.success(sOrderService.getSOrder());
	}

}
